<?= '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; ?>
<?php echo $this->doctype(); ?>

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <base href="<?= $this->baseUrl(); ?>/" />
        <meta http-equiv="content-language" content="pl" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <?= $this->headTitle('Toruń online')->setSeparator(' - ')->headTitle('Panel administratora') ?>
        <link rel="icon" href="<?= $this->baseUrl(); ?>/favicon.ico" type="image/x-icon" />
<?php 

/* @var $a Zend_View_Helper_HeadScript */
$a = $this->headScript();
/* @var $c Zend_View_Helper_Placeholder_Container */
$c = $a->getContainer();
//d($c->getArrayCopy());
?>
        <?=
                $this->headLink()
                ->prependStylesheet($this->baseUrl() . '/admin/css/style.css')
                ->prependStylesheet($this->baseUrl() . '/admin/css/table.css')
                ->prependStylesheet($this->baseUrl() . '/libs/toi/css/flash-messenger.css')
                ->prependStylesheet($this->baseUrl() . '/libs/bootstrap/css/bootstrap.min.css')
                ->prependStylesheet($this->baseUrl() . '/admin/css/theme/jquery-ui.css')
                ->prependStylesheet($this->baseUrl() . '/libs/prettyphoto/css/prettyPhoto.css')
                ->prependStylesheet($this->baseUrl() . '/libs/normalize/normalize.css')
        ?>
        <?= $this->headStyle() ?>
        <?php $this->headScript()->captureStart(Zend_View_Helper_Placeholder_Container_Abstract::PREPEND); ?>
        var isIE = /*@cc_on!@*/!1;  // f*g IE
        var CONST = new Object();
        CONST.baseUrl = '<?= $this->baseUrl() ?>';
        var adminBaseUrl = '<?= $this->url(array(), 'admin', true) ?>';
        <?php $this->headScript()->captureEnd(); ?>
        <?=
                $this->headScript()
                ->prependFile($this->baseUrl() . '/admin/js/script.js')
                ->prependFile($this->baseUrl() . '/admin/js/smart-button.js')
                ->prependFile($this->baseUrl() . '/js/script.js')
                ->prependFile($this->baseUrl() . '/libs/toi/js/utils.js')
                ->prependFile($this->baseUrl() . '/libs/toi/js/xhr.js')
                ->prependFile($this->baseUrl() . '/libs/toi/js/flash-messenger.js')
                ->prependFile($this->baseUrl() . '/libs/bootstrap/js/bootstrap.js')
                ->prependFile($this->baseUrl() . '/libs/prettyphoto/js/jquery.prettyPhoto.js')
                ->prependFile($this->baseUrl() . '/libs/jquery-ui/js/jquery-ui.js')
                ->prependFile($this->baseUrl() . '/js/jquery.js')
        ?>
    </head>
    <body>
        <div class="navbar">
            <div class="navbar-inner">
                <h1>Toruń online - panel administratora</h1>

                <ul class="nav">
                    <?php $menuSelected = isset($this->menuSelected) ? $this->menuSelected : 'index' ?>
                    <li class="<?= $menuSelected == 'index' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'index'), 'admin', true); ?>">Start</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'offer' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'offer'), 'admin', true); ?>">Oferty</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'catalog' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'catalog'), 'admin', true); ?>">Katalog firm i instytucji</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'payment' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'payment'), 'admin', true); ?>">Płatności</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'event' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'event'), 'admin', true); ?>">Wydarzenia</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'adv' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'adv'), 'admin', true); ?>">Reklamy</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'static-page' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'static-page'), 'admin', true); ?>">Strony statyczne</a></li>
                    <li class="divider-vertical"></li>
                    <li class="<?= $menuSelected == 'property' ? 'active' : '' ?>"><a href="<?= $this->url(array('controller' => 'property'), 'admin', true); ?>">Ustawienia</a></li>
                    <li class="divider-vertical"></li>
                    <li><a class="logout" href="<?= $this->url(array('controller' => 'login', 'action' => 'out'), 'admin', true); ?>">Wyloguj</a></li>
                    <li class="divider-vertical"></li>
                </ul>
            </div>
        </div>
        <?= $this->render('common/submenu.phtml') ?>
        <div class="container-fluid std-bg">
            <?= $this->render('common/flash-messenger.phtml') ?>
            <?php echo $this->layout()->content ?>
        </div>
        <div id="loadingModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-body">
                <p><?= $this->translate('XXX_MODAL_LOADING') ?></p>
            </div>
        </div>
    </body>
</html>
